Optimal. Leaf size=121 \[ \frac {b \left (6 a^2-b^2 \left (2-3 n+n^2\right )\right ) \, _2F_1\left (2,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{6 a^4 d (1+n)}+\frac {\cos ^3(c+d x) (a+b \sec (c+d x))^{1+n} (2 a-b (2-n) \sec (c+d x))}{6 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3959, 150, 67}
\begin {gather*} \frac {\cos ^3(c+d x) (2 a-b (2-n) \sec (c+d x)) (a+b \sec (c+d x))^{n+1}}{6 a^2 d}+\frac {b \left (6 a^2-b^2 \left (n^2-3 n+2\right )\right ) (a+b \sec (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac {b \sec (c+d x)}{a}+1\right )}{6 a^4 d (n+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 67
Rule 150
Rule 3959
Rubi steps
\begin {align*} \int (a+b \sec (c+d x))^n \sin ^3(c+d x) \, dx &=-\frac {\text {Subst}\left (\int \frac {(-1+x) (1+x) (a-b x)^n}{x^4} \, dx,x,-\sec (c+d x)\right )}{d}\\ &=\frac {\cos ^3(c+d x) (a+b \sec (c+d x))^{1+n} (2 a-b (2-n) \sec (c+d x))}{6 a^2 d}-\frac {\left (6-\frac {b^2 (1-n) (2-n)}{a^2}\right ) \text {Subst}\left (\int \frac {(a-b x)^n}{x^2} \, dx,x,-\sec (c+d x)\right )}{6 d}\\ &=\frac {b \left (6 a^2-b^2 \left (2-3 n+n^2\right )\right ) \, _2F_1\left (2,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{6 a^4 d (1+n)}+\frac {\cos ^3(c+d x) (a+b \sec (c+d x))^{1+n} (2 a-b (2-n) \sec (c+d x))}{6 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.21, size = 155, normalized size = 1.28 \begin {gather*} \frac {\cos (c+d x) \left (-\frac {2 (2 a-b (-2+n)) (b+a \cos (c+d x))^2}{a}+8 \cos ^2\left (\frac {1}{2} (c+d x)\right ) (b+a \cos (c+d x))^2-\frac {2 b \left (-6 a^2+b^2 \left (2-3 n+n^2\right )\right ) \, _2F_1\left (2,1-n;2-n;\frac {a \cos (c+d x)}{b+a \cos (c+d x)}\right )}{a (-1+n)}\right ) (a+b \sec (c+d x))^n}{12 a d (b+a \cos (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.34, size = 0, normalized size = 0.00 \[\int \left (a +b \sec \left (d x +c \right )\right )^{n} \left (\sin ^{3}\left (d x +c \right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\sin \left (c+d\,x\right )}^3\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^n \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________